package com.tarena.day0917;

public class Rect {
int x;
int y;
int width;
int height;
	//Location：位置，设置位置到x1,y1
	public void setLocation(int x1,int y1){
		x=x1;
		y=y1;
	}
	//size:大小，设置大小为：w,h
	public void setSize(int w,int h){
		width=w;
		height=h;
	}
	//返回 对象的文本描述,重写object的toString()方法
	public String toString(){
		return x+","+y+","+width+","+height;
	}
}
